package org.fitweb.fixture;

public interface WebServerProvider {

    /**
     * Makes sure that a web server has been started, and is listening on the specified port. For example, this could access
     * a singleton instance of an embedded web server, starting it up if necessary. Consider using Jetty, as it is very
     * easy to embed.
     *
     * @param port You can probably work this one out
     * @return True if a web server instance is now available, false otherwise
     */
    boolean start(int port);

    /**
     * Stop the server instance started or created by the start() method.
     * 
     * @return True if the instance was successfully stopped
     */
    boolean stop();
}
